package de.gwtprime.client.event;

import java.util.List;

import com.google.gwt.event.shared.GwtEvent;

import de.gwtprime.client.event.handler.VotesAnswersLoadedEventHandler;
import de.gwtprime.shared.requestFactory.VoteAnswerProxy;

public class VotesAnswerLoadedEvent extends GwtEvent<VotesAnswersLoadedEventHandler>{

public static Type<VotesAnswersLoadedEventHandler> TYPE = new Type<VotesAnswersLoadedEventHandler>();
	
	private List<VoteAnswerProxy> votes;
	public VotesAnswerLoadedEvent(List<VoteAnswerProxy> votes){
		this.setVotes(votes);
	}
	
	@Override
	public Type<VotesAnswersLoadedEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(VotesAnswersLoadedEventHandler handler) {
		handler.onVotesLoaded(this);
		
	}

	public List<VoteAnswerProxy> getVotes() {
		return votes;
	}

	public void setVotes(List<VoteAnswerProxy> votes) {
		this.votes = votes;
	}


}
